public class StringDemo3 {
    static void main() {
        String talk = "你玩得真好，以后不要再玩了，TMD，CNM";
        String[] arr = {"TMD","CNM","SB","MLGB"};
        for(int i =0; i < arr.length; i++){
            talk = talk.replace(arr[i],"***");
        }
        System.out.println(talk);
    }
}
